package pro.reznick.geoalarm.map;

import android.graphics.Point;
import android.graphics.drawable.Drawable;
import org.osmdroid.ResourceProxy;
import org.osmdroid.views.MapView;
import org.osmdroid.views.overlay.ItemizedOverlay;
import org.osmdroid.views.overlay.OverlayItem;

import java.util.ArrayList;
import java.util.List;

/**
 * @author alex
 * @since 8/12/11 2:55 PM
 */

public class AlarmOverlay extends ItemizedOverlay
{
    List<OverlayItem> alarmItems = new ArrayList<OverlayItem>();

    public AlarmOverlay(Drawable defaultMarker, ResourceProxy resourceProxy)
    {
        super(defaultMarker, resourceProxy);

    }

    public void addOverlay(OverlayItem overlay)
    {
        alarmItems.add(overlay);
        populate();
    }

    @Override
    protected OverlayItem createItem(int i)
    {
        return alarmItems.get(i);
    }

    @Override
    public int size()
    {
        return alarmItems.size();
    }

    @Override
    public boolean onSnapToItem(int i, int i1, Point point, MapView mapView)
    {
        return false;  //To change body of implemented methods use File | Settings | File Templates.
    }

}
